Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use FLASK_ADMIN_ prefix for all app.config configuration #2472

Merged
merged 5 commits into from
Jul 23, 2024
Merged

Use FLASK_ADMIN_ prefix for all app.config configuration #2472

merged 5 commits into from
Jul 23, 2024

Conversation

samuelhwilliams
Copy link
Contributor

@samuelhwilliams samuelhwilliams commented Jul 23, 2024

Moves all of the Flask app configuration for Flask-Admin under the FLASK_ADMIN_ namespace/prefix, so that it's easier for users to group/identify.

Also adds some light information about the configuration to our documentation.


We also address a confusion situation with maps:

Previously the Flask app config option FLASK_ADMIN_MAPBOX_MAP_ID was
required to enable map widgets, even if MapBox wasn't being used.

Let's clear up this confusion by having a clearer config name for
toggling maps on/off: FLASK_ADMIN_MAPS.

And then finally update the documentation around maps to talk about this
new configuration, and also talk about how to override the default
MapBox integration.

Finally, we update the geoalchemy example app to have some pages use the
default MapBox integration and some use OSM instead.


fixes: #2034

Previously the Flask app config option `FLASK_ADMIN_MAPBOX_MAP_ID` was
required to enable map widgets, even if MapBox wasn't being used.

Let's clear up this confusion by having a clearer config name for
toggling maps on/off: `FLASK_ADMIN_MAPS`.

And then finally update the documentation around maps to talk about this
new configuration, and also talk about how to override the default
MapBox integration.

Finally, we update the geoalchemy example app to have some pages use the
default MapBox integration and some use OSM instead.
@samuelhwilliams samuelhwilliams changed the title Update env vars Consistent Flask-Admin configuration Jul 23, 2024
@samuelhwilliams samuelhwilliams changed the title Consistent Flask-Admin configuration Use FLASK_ADMIN_ prefix for all app.config configuration Jul 23, 2024
@samuelhwilliams samuelhwilliams merged commit dd9202c into pallets-eco:master Jul 23, 2024
8 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

Default Leaflet Basemap Tiles
1 participant